//引入mockjs
import Mock from 'mockjs'
//使用mockjs模拟数据

Mock.mock('/api/', 'get', Option => {
    const {Taccount, Tpwd}  = JSON.parse(Option.body)
    console.log("Taccount :"+Taccount)
    console.log("Tpwd :"+Tpwd)
    if (Taccount == "admin" && Tpwd == "admin"){
        return{
            code:1001,
            status: 0 ,
            message:'登录成功'  
        }
    }else{
        return{
            code:400,
            status: 0 ,
            message:'登录失败啦！'  
        }
    }
   
//data里的属性看不懂，需要详细看语法规范,博客链接:https://www.jianshu.com/p/4579f40e6108
});

Mock.mock('/api/tlogin/', 'get', Option => {
    const {Taccount, Tpwd}  = JSON.parse(Option.body)
    console.log("Taccount :"+Taccount)
    console.log("Tpwd :"+Tpwd)
    if (Taccount == "swf" && Tpwd == "swf123"){
        return{
            code:1001,
            status: 0 ,
            message:'登录成功'  
        }
    }else{
        return{
            code:400,
            status: 0 ,
            message:'登录失败啦！'  
        }
    }
   
//data里的属性看不懂，需要详细看语法规范,博客链接:https://www.jianshu.com/p/4579f40e6108
});


Mock.mock('/api/ClassRoomMapper/', 'get',  {
    message:'获取教室列表成功',
    data:[1,2,3]
    
//data里的属性看不懂，需要详细看语法规范,博客链接:https://www.jianshu.com/p/4579f40e6108
});

Mock.mock('/api/ClassRoomMapper/', 'delete',  {
    message:'删除成功',
    data:[1,2,3]
    
//data里的属性看不懂，需要详细看语法规范,博客链接:https://www.jianshu.com/p/4579f40e6108
});


Mock.mock('/api/ClassRoomMapper/update/', 'put', {
    
    message:'更新成功',
    data:[1,2,3]
    
//data里的属性看不懂，需要详细看语法规范,博客链接:https://www.jianshu.com/p/4579f40e6108
});

Mock.mock('/api/ClassRoomMapper/save/', 'post',  {
    message:'添加成功成功',
    data:[1,2,3]
    
//data里的属性看不懂，需要详细看语法规范,博客链接:https://www.jianshu.com/p/4579f40e6108
});










